import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
//编译CP才能运行 :java -cp .;commons-logging-1.3.5.jar Main
public class Person {
    protected final Log log = LogFactory.getLog(getClass());

    void foo() {
        log.info("foo");
    }
}
public class Student extends Person {
    void bar() {
        log.info("bar");
    }
}
public class Main {
    static final Log log = LogFactory.getLog(Main.class);

    static void foo() {
        log.info("foo");
    }

    public static void main(String[] args) {
        Logger logger = Logger.getGlobal();
        logger.info("start process...");
        logger.warning("memory is running out...");
        logger.fine("ignored.");
        logger.severe("process will be terminated...");
        Log log = LogFactory.getLog(Main.class);
        log.info("start...");
        log.warn("end.");
        Student student = new Student();
        student.foo();
        Person person = new Person();
        person.foo();
        foo();

    }
}
